<?php
/*
	插件初始化
*/
namespace jy_nongren;
defined('BY_JYA') or exit('error');
function init($plugin){
	//定义本场景的一些独立,为空表示共用电商客的
	$plugin->syscolor=$plugin->plugin_setting('basic')['syscolor']?:'';
	if($_SESSION['onemerchid']){
		$plugin->setting=$plugin->plugin_setting('basic'.$_SESSION['onemerchid']);
	}else{
		$_SESSION['onemerchid']=0;
		$plugin->setting=$plugin->plugin_setting('basic');
	}
	$plugin->plugins=array();
	$plugin->myji_step=array('小鸡仔','童子鸡','青年鸡');
	$plugin->myji_status=array('待付款','健康喂养中','正在饥饿','已死亡','已委托销售');
	$plugin->myjiorder_status=array('待付款','已支付','已发货','已完成','已取消');
	$plugin->jilog_type=array('购买蛋鸡仔','喂养鸡仔','加速鸡仔成长','复活鸡仔','生鸡蛋');
	$plugin->feelog_type=array('购买蛋鸡仔','购买粮食','委托平台投喂');
	$plugin->feelog_status=array('待付款','已支付');
	$plugin->lslog_type=array(
		'-1'=>'喂养消耗',
		'0'=>'购买粮食',
		'1'=>'每日领粮',
		'2'=>'签到领粮',
		'3'=>'串门好友领粮',
		'4'=>'浏览商城领粮',
		'5'=>'浏览动态领粮',
		'6'=>'邀请好友领粮'
	);
	$plugin->cvlog_type=array(
		'0'=>'购物奖励',
		'1'=>'租养消费',
		'2'=>'分享朋友圈',
		'3'=>'好友认养奖励',
		'4'=>'下级购物奖励',
		'5'=>'浏览商品',
		'6'=>'转发商品链接',
	);
	$plugin->datatypes=array(
		'head'=>'头像',
		'nickname'=>'昵称',
		'qr'=>'二维码',
		'img'=>'图片',
		'text'=>'自定义文字',
	);
	$plugin->datapushs=array(
		'head'=>array(
						'left' => '10',
						'top' => '10',
						'type' => 'head',
						'width' => '80',
						'height' => '80',
		),
		'qr'=>array(
						'left' => '10',
						'top' => '10',
						'type' => 'qr',
						'width' => '80',
						'height' => '80',
		),
		'nickname'=>array(
						'left' => '10',
						'top' => '10',
						'type' => 'nickname',
						'width' => '120',
						'height' => '26',
		),
		'img'=>array(
						'left' => '10',
						'top' => '10',
						'type' => 'img',
						'width' => '200',
						'height' => '200',
		),
		'title'=>array(
						'left' => '10',
						'top' => '10',
						'type' => 'title',
						'width' => '226',
						'height' => '50',
		),
		'thumb'=>array(
						'left' => '0',
						'top' => '0',
						'type' => 'thumb',
						'width' => '316',
						'height' => '316',
		),
		'text'=>array(
						'left' => '10',
						'top' => '10',
						'type' => 'text',
						'width' => '260',
						'height' => '26',
						'value' => '自定义文字',
		),
	);
	$plugin->goodsdatademo=array(
		array(
						'left' => '110',
						'top' => '385',
						'type' => 'qr',
						'width' => '100',
						'height' => '100',
		),
		array(
						'left' => '116',
						'top' => '490',
						'type' => 'text',
						'width' => '100',
						'height' => '25',
						'size' => '9',
						'value' => '长按或扫描查看',
						'color'=>'#ddd',
		),
	);
}